package android.slc.appbase.api.slc.callback.po;

public class SlcEntity<T> {
    private T data;
    private int code;
    private String msg;

    public static <T> SlcEntity<T> getSlcEntityByData(T data) {
        SlcEntity<T> slcEntity = new SlcEntity<>();
        slcEntity.setCode(200);
        slcEntity.setData(data);
        return slcEntity;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getStatus() {
        return code;
    }

    public void setStatus(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isSuccess() {
        return code == 200 || code == 0;
    }


}
